#!/bin/sh
echo ''>._dtreejsgen_template
tree -Jf|grep '"type":"directory"'|sed 's/,"contents":\[/\},/g'>>._dtreejsgen_template
tree -Jf|grep '"type":"file"'>>._dtreejsgen_template
echo '['>${1}
cat ._dtreejsgen_template|sed 's/\}/\},/g'|sed 's/,,/,/g'|sed '$s/},/}/'>>${1}
echo ']'>>${1}
rm ._dtreejsgen_template
